/* ==========================================================
   AI Delivery - One Framework, Every Service
   File: wwwroot/css/ai-delivery-framework.css
   Used by: Views/Partials/blocklist/Components/aiDeliveryFrameworkBlock.cshtml
   Fluid layout: same scaling as the other blocks (6.8vw gutter).
   ========================================================== */
.ai-fw {
  --fw-navy: #14256b;
  --fw-orange: #ff9a45;
  --fw-gutter: 6.8vw;
  --fw-gap: clamp(12px, 1.8vw, 46px);
  --fw-pad: clamp(18px, 1.4vw, 36px);
  --fw-glass: rgba(255, 255, 255, .26);
  --fw-ease: cubic-bezier(.65, 0, .35, 1);
  --fw-ease-out: cubic-bezier(.16, 1, .3, 1);

  position: relative;
  box-sizing: border-box;
  width: 100%;
  overflow: hidden;
  background: #1c2440;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #fff;
  -webkit-font-smoothing: antialiased;
  isolation: isolate;
}
.ai-fw *, .ai-fw *::before, .ai-fw *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ---------- Background (image or video) ---------- */
.ai-fw__media { position: absolute; inset: 0; z-index: -1; }
.ai-fw__bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.ai-fw__media::after {                       /* keeps white text readable on any photo */
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(14, 22, 52, .62) 0%, rgba(14, 22, 52, .38) 45%, rgba(14, 22, 52, .5) 100%);
}

.ai-fw__inner {
  padding: clamp(44px, 4.3vw, 112px) var(--fw-gutter) clamp(48px, 6.3vw, 162px);
}

/* ---------- Heading row ---------- */
.ai-fw__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 35vw;
  gap: clamp(20px, 4vw, 104px);
  align-items: start;
  margin-bottom: clamp(24px, 2.6vw, 66px);
}
.ai-fw__eyebrow {
  margin-bottom: clamp(10px, 1.1vw, 28px);
  font-size: clamp(11px, .85vw, 22px);
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #fff;
}
.ai-fw__heading {
  max-width: 48vw;
  font-size: clamp(24px, 2.08vw, 54px);
  font-weight: 600;
  line-height: 1.25;
  color: #fff;
}
.ai-fw__intro {
  padding-top: clamp(0px, 2.4vw, 62px);
  font-family: "DM Sans", "Poppins", sans-serif;
  font-size: clamp(13px, .9vw, 23px);
  line-height: 1.6;
  color: rgba(255, 255, 255, .88);
}

/* ---------- Cards ---------- */
.ai-fw__grid {
  display: grid;
  grid-template-columns: repeat(30, minmax(0, 1fr));
  gap: var(--fw-gap);
}
.ai-fw__card {
  position: relative;
  display: block;
  grid-column: span var(--span, 10);
  min-width: 0;
  padding: var(--fw-pad) var(--fw-pad) calc(var(--fw-pad) * 1.15);
  color: #fff;
  text-decoration: none;
  background-color: var(--fw-glass);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  backdrop-filter: blur(14px) saturate(1.1);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08) inset;
  outline: none;
  transition: background-color .7s var(--fw-ease), box-shadow .7s var(--fw-ease);
}
.ai-fw__card.is-active {
  background-color: var(--fw-navy);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .04) inset, 0 18px 40px rgba(6, 12, 40, .28);
}
.ai-fw__card:focus-visible,
.ai-fw__card:has(.ai-fw__link:focus-visible) { box-shadow: 0 0 0 2px var(--fw-orange) inset; }
/* whole card is clickable when it has a link */
.ai-fw__link { position: absolute; inset: 0; z-index: 2; outline: none; }
.ai-fw__card:has(.ai-fw__link) { cursor: pointer; }

.ai-fw__card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: clamp(12px, 1.1vw, 28px);
}
.ai-fw__title {
  font-size: clamp(16px, 1.3vw, 34px);
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
}

/* arrow: plain orange arrow on glass, filled orange square on the navy card */
.ai-fw__arrow {
  flex: none;
  display: grid;
  place-items: center;
  width: clamp(18px, 1.6vw, 42px);
  height: clamp(18px, 1.6vw, 42px);
  color: var(--fw-orange);
  background-color: rgba(255, 154, 69, 0);
  transition: background-color .6s var(--fw-ease), color .6s var(--fw-ease), transform .6s var(--fw-ease-out);
}
.ai-fw__arrow svg { width: 72%; height: 72%; }
.ai-fw__card.is-active .ai-fw__arrow { background-color: var(--fw-orange); color: #fff; }
.ai-fw__card:hover .ai-fw__arrow { transform: translate(2px, -2px); }

.ai-fw__label {
  margin-bottom: clamp(8px, .9vw, 22px);
  font-size: clamp(11px, .82vw, 21px);
  font-weight: 600;
  line-height: 1.4;
  color: #fff;
}
.ai-fw__text {
  font-family: "DM Sans", "Poppins", sans-serif;
  font-size: clamp(13px, .9vw, 23px);
  line-height: 1.6;
  color: rgba(255, 255, 255, .9);
}
.ai-fw__rule {
  height: 1px;
  margin: clamp(14px, 1.4vw, 36px) 0 clamp(14px, 1.3vw, 34px);
  border: 0;
  background: rgba(255, 255, 255, .4);
}

/* ---------- Entrance (added by JS only) ---------- */
.ai-fw.js-reveal .ai-fw__fx { opacity: 0; transform: translateY(26px); }
.ai-fw.js-reveal .ai-fw__bg { transform: scale(1.08); }
.ai-fw.js-reveal.is-visible .ai-fw__bg { transform: scale(1); transition: transform 3.2s var(--fw-ease-out); }
.ai-fw.js-reveal.is-visible .ai-fw__fx {
  opacity: 1;
  transform: none;
  transition:
    opacity 1s ease var(--fd, 0s),
    transform 1.2s var(--fw-ease-out) var(--fd, 0s),
    background-color .7s var(--fw-ease),
    box-shadow .7s var(--fw-ease);
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .ai-fw { --fw-gutter: 32px; --fw-gap: 16px; --fw-pad: 20px; }
  .ai-fw__head { grid-template-columns: minmax(0, 1fr) minmax(280px, 40%); gap: 32px; }
  .ai-fw__heading { max-width: none; }
}
@media (max-width: 900px) {
  .ai-fw { --fw-gutter: 24px; }
  .ai-fw__head { grid-template-columns: 1fr; gap: 14px; }
  .ai-fw__intro { padding-top: 0; max-width: 640px; }
  .ai-fw__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ai-fw__card { grid-column: span 1; }
  .ai-fw__card:first-child { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .ai-fw { --fw-gutter: 20px; --fw-gap: 14px; }
  .ai-fw__grid { grid-template-columns: 1fr; }
  .ai-fw__card, .ai-fw__card:first-child { grid-column: auto; }
}

/* browsers without backdrop blur: a slightly stronger tint instead */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .ai-fw { --fw-glass: rgba(70, 82, 112, .72); }
}

@media (prefers-reduced-motion: reduce) {
  .ai-fw *, .ai-fw *::before, .ai-fw *::after { transition: none !important; }
}